package a.oschina.observedemo.demo1;

/**
 * 股票同事
 *
 * @author Administrator
 * @version [版本号, 2018/10/23]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class StockObserver {
    //同事姓名
    private String name;
    //前台人员
    private Secretary sub;


    public StockObserver(String name, Secretary sub) {
        this.name = name;
        this.sub = sub;
    }

    //拿到前台通知进行做事
    public void update() {
        System.out.println(sub.getAction()+"股票同事" + name + "关闭股票行情，继续工作");
    }
}
